<?php

use yii\helpers\Html;
use yii\grid\GridView;


$this->title = Yii::t('app', 'Hotel Brands');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="hotel-brand-index">

    <div class="box">
        <div class="box-header">
            <?= Html::a(Yii::t('app', 'Create Hotel Brand'), ['create'], ['class' => 'btn btn-success']) ?>
        </div>
        <div class="box-body">
        <p>
             <?php echo $this->render('_search', ['model' => $searchModel]); ?>
        </p>

        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'layout'  =>  "{items}\n{summary}\n{pager}",
            'columns' => [
                ['class' => 'yii\grid\SerialColumn'],

                [
                    'headerOptions' => ['width' => '35%'],
                    'attribute' => 'en_name',
                    'value' => function ($model) {
                            return $model->en_name;
                        },
                ],

                [
                    'headerOptions' => ['width' => '35%'],
                    'attribute' => 'zh_name',
                    'value' => function ($model) {
                            return $model->zh_name;
                        },
                ],

                [
                    'headerOptions' => ['width' => '30%'],
                    'class' => 'yii\grid\ActionColumn',
                    'header' => '操 作',
                    'template' =>"{view} {update}"
                ],
            ],
        ]); ?>
         </div>
    </div>
</div>
